/* Copyright 2007-2008 dnAnalytics Project.
 *
 * Contributors to this file:
 * Patrick van der Velde
 *
 * This file is part of dnAnalytics.  dnAnalytics is licensed under the 
 * Microsoft Public License. See License.txt for a complete copy of the
 * license.
 */
using System;
using dnAnalytics.LinearAlgebra;
using System.Diagnostics;

namespace dnAnalytics.DebugVisualizers
{
    /// <summary>
    /// A <c>VectorProperties</c> class for <c>DenseVector</c> objects.
    /// </summary>
    public sealed class DenseVectorProperties : VectorProperties
    {
        /// <summary>
        /// The vector for which the properties are stored.
        /// </summary>
        private DenseVector m_Vector;

        /// <summary>
        /// Creates a new instance of the <c>DenseVectorProperties</c> class with the specified
        /// <paramref name="vector"/>.
        /// </summary>
        /// <param name="vector">The vector for which the properties are stored.</param>
        /// <exception cref="ArgumentNullException">
        ///     Thrown if <paramref name="vector"/> is <c>null</c>.
        /// </exception>
        public DenseVectorProperties(DenseVector vector)
        {
            if (vector == null)
            {
                throw new ArgumentNullException();
            }

            m_Vector = vector;
        }

        /// <summary>
        /// Returns the vector.
        /// </summary>
        protected override Vector Vector
        {
            [DebuggerStepThrough]
            get
            {
                return m_Vector;
            }
        }
    }
}